package org.mtmi.ui.controls.midi;

import org.mtmi.ui.IMG;
import org.mtmi.ui.controls.Control;
import org.mtmi.ui.drawables.IDrawable;

/**
 * This action display a menu to choose a controller number from 0..127,
 */
public class ChangeMidiControllerAction extends ChangeMidiValueAction
{
	
	public ChangeMidiControllerAction() {
		super();
	}
	
	@Override
	protected int getValue( Control c ) {
		return ((MidiController)c).getMidiController();
	}
	
	@Override
	protected void setValue( Control c, int value ) {
		((MidiController)c).setMidiController( value );
	}
	
	@Override
	protected IDrawable getValueImage() {
		return IMG.GetD( IMG.I_MIDI_CONTROLLER );
	}
}